<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: xiangyinjie
  Date: 2021/5/14
  Time: 18:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    //获取项目的根路径
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <meta charset="utf-8">
    <title>缴费消息查询</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="stylesheet" href="<%=basePath%>static/layui-v2.6.5/layui/css/layui.css">
    <script src="<%=basePath%>static/layui-v2.6.5/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/swee/sweetalert.css">
    <script type="text/javascript" src="<%=basePath%>static/swee/sweetalert-dev.js"></script>
</head>
<style type="text/css">
    .layui-inline {
        margin-left: 40%;
    }
</style>
<body>

<form method="post" action="<%=basePath%>Consume/pageconsume">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
        <legend>缴费状况</legend>
    </fieldset>
    <div class="layui-inline">
        <div class="layui-input-inline ">
            <input type="text" name="name" id="state" class="layui-input">
        </div>
    </div>
    <button type="submit" class="layui-btn" style="background-color:#009f95;">搜索</button>
</form>

<table class="layui-table" lay-skin="line" id="stateJf">
    <colgroup>
        <col width="150">
        <col width="150">
        <col width="200">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>名字</th>
        <th>消费类型</th>
        <th>详细信息</th>
        <th>消费时间</th>
        <th>金额</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="consume">
        <tr>
            <td>${consume.frontdeskCard.name}</td>
            <td>${consume.consumeType}</td>
            <td>${consume.drugType}</td>
            <td>${consume.times}</td>
            <td>${consume.money}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>

<span style="margin-left: 40%">
    <a href="<%=basePath%>Consume/pageconsume?curr=${page.firstPage}&name=${name}">首页</a>
    <a href="<%=basePath%>Consume/pageconsume?curr=${page.prePage}&name=${name}">上一页</a>
    <a href="<%=basePath%>Consume/pageconsume?curr=${page.nextPage}&name=${name}">下一页</a>
    <a href="<%=basePath%>Consume/pageconsume?curr=${page.lastPage}&name=${name}">尾页</a>

   <span>第${page.pageNum}页/共${page.pages}页(${page.total}条记录)</span>
</span>
</body>
</html>
